home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / jovept1.arc / CURS.C < prev    next >
Text File  |  1985-05-30  |  2KB  |  91 lines

  1. /* curs.c */
  2.  
  3. /* JOVE/MSDOS. K. Mitchum 1/85 */
  4. /* Modifications for personal use only. */
  5. /* original code J. Payne LSRHS 5/83 */
  6. /* Ken Mitchum */
  7. /* University of Pittsburgh */
  8. /* Decision Systems Laboratory */
  9.  
  10. /*
  11.    Jonathan Payne at Lincoln-Sudbury Regional High School 5-25-83
  12.  
  13.    jove_curs.c
  14.  
  15.    The cursor optimization happens here.  You may decide that this
  16.    is going too far with cursor optimization, or perhaps it should
  17.    limit the amount of checking to when the output speed is slow.
  18.    What ever turns you on ...   */
  19.  
  20.  
  21. #define JOVE_TERM
  22.  
  23. #include "jove.h"
  24. #include "tm.h"
  25. #include "screen.h"
  26.  
  27.  
  28. extern int phystab;
  29. extern int InMode;
  30.  
  31. #ifdef TERMCAP
  32. #include "termcap.h"
  33.  
  34. struct cursaddr {
  35.     int    c_numchars,
  36.         (*c_func)();
  37. };
  38. struct cursaddr DirectMin;
  39.  
  40. char *Cmstr;
  41. #endif
  42.  
  43. InitCM()
  44. {
  45.     return;
  46. }
  47.  
  48.  
  49. DoPlacur(line,col)
  50. int line,col;
  51. {
  52.         if (line == CapLine && col == CapCol)
  53.         return;        /* We are already there. */
  54.  
  55.     if (InMode) {
  56.         ex_ins_mode();
  57.         InMode = 0;
  58.     }
  59. #ifdef TERMCAP
  60.     Cmstr = tgoto(CM,col,line);
  61.     GoDirect(line,col);
  62. #else
  63.     (*tt.t_topos) (line,col);
  64. #endif
  65. CapLine = line;
  66. CapCol = col;
  67.  
  68.     return;
  69. }
  70.  
  71.  
  72. writechars(start,end)
  73. char *start, *end;
  74. {
  75.     (*tt.t_writechars) (start,end);
  76.     return;
  77. }
  78.  
  79.  
  80. /*----------------------------o.s. dependent-------------------------*/
  81. /* end */
  82.  
  83. #ifdef TERMCAP
  84. GoDirect(line, col)
  85. register int    line,
  86.         col;
  87. {
  88.     putpad(Cmstr, 1), CapLine = line, CapCol = col;
  89. }
  90. #endif
  91.